﻿/*****************************************************************//**
 * @file   VAOneXMLAdaptorMaterialViscoElastic.h
 * @brief  VAOne读写适配器粘弹性材料
 * 
 * @author XingXuanCi (xingxuanci@diso.cn)
 * @date   2024-11-05
 *********************************************************************/
#ifndef VAOneXMLAdaptorMaterialViscoElastic_H
#define VAOneXMLAdaptorMaterialViscoElastic_H

#include "FITKVAOneXMLIOAPI.h"
#include "FITKAbstractVAOneXMLAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

namespace Acoustics
{
    class FITKAcousticsAbstractSpectra;
}

namespace IO
{
    /**
     * @brief   VAOne读写适配器粘弹性材料
     * @author  XingXuanCi (xingxuanci@diso.cn)
     * @date    2024-11-05
     */
    class FITKVAOneXMLIOAPI VAOneXMLAdaptorMaterialViscoElastic : public FITKAbstractVAOneXMLAdaptor
    {
        FITKCLASS(IO, VAOneXMLAdaptorMaterialViscoElastic);
    public:

        /**
         * @brief   构造函数
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        explicit VAOneXMLAdaptorMaterialViscoElastic()= default;
        /**
         * @brief   析构函数
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        ~VAOneXMLAdaptorMaterialViscoElastic() = default;
        /**
         * @brief   适配器读数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        bool adaptR() override;
        /**
         * @brief   适配器写数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        bool adaptW() override;

    private:
        /**
         * @brief   读取粘弹性材料数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        bool readMaterialViscoElastic();
        /**
         * @brief   写粘弹性材料数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        bool writeMaterialViscoElastic();    
};
    Register2FITKIOAdaptorFactory(VAOneXML, Acoustics::FITKAcousticsMaterialsViscoElastic, VAOneXMLAdaptorMaterialViscoElastic)
}

#endif // VAOneXMLAdaptorMaterialViscoElastic_H
